package com.xyy.saas.payment.callback.core.dto;

import java.util.Date;

/**
 * @author wangtianqi
 * @date 2019/11/26 11:36
 */
public class CallbackMsg {

    private String tradeNo;
    private String businessOrderNo;
    private String type;
    private Integer amount;
    private Integer fee;
    private Long successTime;
    private String callback;
    private String channel;
    private String businessId;
    private String settleStatus;
    private String msg;
    private String extend;
    private Date notifyTime;
    private String merchantId;
    private String channelOrderNo;

    /**
     * 构建对象
     */
    public static CallbackMsg build(String tradeNo, String type, Integer amount, Integer fee, Long successTime,
                                    String callback, String channel, Date notifyTime, String merchantId)
    {
        CallbackMsg callbackMsg = new CallbackMsg();
        callbackMsg.setTradeNo(tradeNo);
        callbackMsg.setType(type);
        callbackMsg.setAmount(amount);
        callbackMsg.setFee(fee);
        callbackMsg.setSuccessTime(successTime);
        callbackMsg.setCallback(callback);
        callbackMsg.setChannel(channel);
        callbackMsg.setNotifyTime(notifyTime);
        callbackMsg.setMerchantId(merchantId);
        return callbackMsg;
    }

    /**
     * 构建对象
     */
    public static CallbackMsg build(String type, String callback, String tradeNo, String businessOrderNo, String msg) {
        CallbackMsg callbackMsg = new CallbackMsg();
        callbackMsg.setType(type);
        callbackMsg.setCallback(callback);
        callbackMsg.setTradeNo(tradeNo);
        callbackMsg.setBusinessOrderNo(businessOrderNo);
        callbackMsg.setMsg(msg);
        return callbackMsg;
    }

    /**
     * 构建对象
     */
    public static CallbackMsg build(String type, String callback, String tradeNo, String businessOrderNo, String msg, Long successTime) {
        CallbackMsg callbackMsg = new CallbackMsg();
        callbackMsg.setType(type);
        callbackMsg.setCallback(callback);
        callbackMsg.setTradeNo(tradeNo);
        callbackMsg.setBusinessOrderNo(businessOrderNo);
        callbackMsg.setMsg(msg);
        callbackMsg.setSuccessTime(successTime);
        return callbackMsg;
    }

    /**
     * 构建对象
     */
    public static CallbackMsg build(String type, String callback, String tradeNo, String businessOrderNo, String msg, String extend) {
        CallbackMsg callbackMsg = new CallbackMsg();
        callbackMsg.setType(type);
        callbackMsg.setCallback(callback);
        callbackMsg.setTradeNo(tradeNo);
        callbackMsg.setBusinessOrderNo(businessOrderNo);
        callbackMsg.setMsg(msg);
        callbackMsg.setExtend(extend);
        return callbackMsg;
    }

    /**
     * 构建对象
     */
    public static CallbackMsg build(String type, String tradeNo, String callback, String msg) {
        CallbackMsg callbackMsg = new CallbackMsg();
        callbackMsg.setType(type);
        callbackMsg.setTradeNo(tradeNo);
        callbackMsg.setCallback(callback);
        callbackMsg.setMsg(msg);
        return callbackMsg;
    }

    public String getTradeNo() {
        return tradeNo;
    }

    public void setTradeNo(String tradeNo) {
        this.tradeNo = tradeNo;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Integer getAmount() {
        return amount;
    }

    public void setAmount(Integer amount) {
        this.amount = amount;
    }

    public Integer getFee() {
        return fee;
    }

    public void setFee(Integer fee) {
        this.fee = fee;
    }

    public Long getSuccessTime() {
        return successTime;
    }

    public void setSuccessTime(Long successTime) {
        this.successTime = successTime;
    }

    public String getCallback() {
        return callback;
    }

    public void setCallback(String callback) {
        this.callback = callback;
    }

    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public String getBusinessId() {
        return businessId;
    }

    public void setBusinessId(String businessId) {
        this.businessId = businessId;
    }

    public String getSettleStatus() {
        return settleStatus;
    }

    public void setSettleStatus(String settleStatus) {
        this.settleStatus = settleStatus;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getExtend() {
        return extend;
    }

    public void setExtend(String extend) {
        this.extend = extend;
    }

    public String getBusinessOrderNo() {
        return businessOrderNo;
    }

    public void setBusinessOrderNo(String businessOrderNo) {
        this.businessOrderNo = businessOrderNo;
    }

    public Date getNotifyTime() {
        return notifyTime;
    }

    public void setNotifyTime(Date notifyTime) {
        this.notifyTime = notifyTime;
    }

    public String getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(String merchantId) {
        this.merchantId = merchantId;
    }

    public String getChannelOrderNo() {
        return channelOrderNo;
    }

    public void setChannelOrderNo(String channelOrderNo) {
        this.channelOrderNo = channelOrderNo;
    }

    public CallbackMsg() {
    }

    public CallbackMsg(String tradeNo, String type, Integer amount, Integer fee, Long successTime, String callback, String channel) {
        this(tradeNo, type, amount, fee, successTime, callback, channel, null, null, null, null);
    }

    public CallbackMsg(String tradeNo, String type, Integer amount, Integer fee, Long successTime, String callback, String channel, String msg) {
        this(tradeNo, type, amount, fee, successTime, callback, channel, msg, null, null, null);
    }

    public CallbackMsg(String tradeNo, String type, Integer amount, Integer fee, Long successTime, String callback, String channel, String msg, String extend, String businessOrderNo, String merchantId) {
        this.tradeNo = tradeNo;
        this.businessOrderNo = businessOrderNo;
        this.type = type;
        this.amount = amount;
        this.fee = fee;
        this.successTime = successTime;
        this.callback = callback;
        this.channel = channel;
        this.msg = msg;
        this.extend = extend;
        this.merchantId = merchantId;
    }
}
